X = zeros(6, 3);
x = zeros(6, 2);
for i = 1:6
    px = (101-99)*rand() + 99;
    py = 2*rand() - 1;
    pz = 2*rand() + 2;
    X(i,1)=px;
    X(i,2)=py;
    X(i,3)=pz;
    
    m = P * [px;py;pz;1];
    u = m(1) / m(3);
    v = m(2) / m(3);
    
    x(i,1) = u;
    x(i,2) = v;
end
     